class Counter {

  private var value = 0

  def increment() { value += 1 }

  def current = value

  def isLess(other: Counter) = value < other.value  // 可以访问其他对象的私有字段

}
